﻿//用于智能提示显示
/// <reference path="vswd-ext_2.0.2.js" />
/// <reference path="jquery-1.4.2-vsdoc.js" />

//设置UpdateProgress1的高度以适应页面实际高度
function ChangeDiv() {
    var obj = getPageHeight();
    $("#updateAnimation").css("height", obj);
    return true;
}

//获取页面实际高度
function getPageHeight() {
    var yScroll;
    if (window.innerHeight && window.scrollMaxY) {
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight) {
        yScroll = document.body.scrollHeight;
    } else {
        yScroll = document.body.offsetHeight;
    }
    var windowHeight;
    if (self.innerHeight) {
        windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        windowHeight = document.documentElement.clientHeight;
    } else if (document.body) {
        windowHeight = document.body.clientHeight;
    }
    var pageHeight
    if (yScroll < windowHeight) {
        pageHeight = windowHeight;
    } else {
        pageHeight = yScroll;
    }
    return pageHeight;
} 